#include "qnet.h"

QNet::QNet(const QString & filename,QGraphicsScene *scence):QpixmapItem(filename,scence)
{

}
void QNet::advance(int phase){

    if(collidingItems().count()>0){
        QList<QGraphicsItem *> list=this->collidingItems();
        QList<QGraphicsItem *>::Iterator i;
        QFish *fish;
        i=list.begin();
        while(i!=list.end()){
           fish=(QFish *)(*i);
           //delete fish;
           //fish->hide();
           fish->fish_death();
           i++;
        }
    }
    this->hide();
    delete this;
}//网出现，鱼消失，网消失；
